//
//  ShezhiTableViewCell.m
//  XRSquare
//
//  Created by UaenaMo on 2018/8/15.
//  Copyright © 2018年 UaenaMo. All rights reserved.
//

#import "ShezhiTableViewCell.h"

@interface ShezhiTableViewCell ()
{
    UILabel * titleLabel;
    UILabel * contentLabel;
    UIImageView * arrowImage;
    
}
@end

@implementation ShezhiTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, ScreenWidth, 20)];
        [self addSubview:titleLabel];
        
        contentLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, ScreenWidth - 20, 20)];
        contentLabel.textAlignment = NSTextAlignmentRight;
        [self addSubview:contentLabel];
        
        arrowImage = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 10, 10)];
        arrowImage.center = CGPointMake(ScreenWidth - 20, 20);
        [self addSubview:arrowImage];
    }
    return self;
}

+(CGFloat)height
{
    return 40;
}

-(void)loadTitle:(NSString *)title content:(NSString *)content arrow:(BOOL)arrow
{
    titleLabel.text = title;
    contentLabel.text = content;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
